#pragma once
#include "Coisa.h"
#include "SDL.h"
class Tiro : public Coisa
{
public:
	Tiro(std::string spritePath, int sizeX, int sizeY, int posX, int posY, int bgColorRed, int bgColorGreen, int bgColorBlue, int dX, int dY) : Coisa(spritePath, sizeX, sizeY, posX, posY, bgColorRed, bgColorGreen, bgColorBlue)
	{
		mustDelete = false;
		destinoX = dX;
		destinoY = dY;
		if(destinoX > posX)
			invertX = true;
		a = (double)(dY - posY) / (dX - posX);
		b = posY - (a * posX);
	}
	~Tiro(void);

	bool mustDelete;
	int destinoX;
	int destinoY;
	bool invertX;
	double a;
	double b;
	void move(int limX, int limY);

private:
		
};

